﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PayRoll
{
    public partial class Welcome : TransactionMasterForm
    {
        public Welcome()
        {
            InitializeComponent();
        }

        private void Welcome_Load(object sender, EventArgs e)
        {
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

            progressBar1.Value += 2;
            if (progressBar1.Value <= 30)
            {
                label3.Text = "Initializing System.....";
            }
            else if (progressBar1.Value <= 50)
            {
                label3.Text = "Loading Components.....";
            }
            else if (progressBar1.Value <= 70)
            {
                label3.Text = "Integrating Database....";
            }
            else if (progressBar1.Value <= 100)
            {
                label3.Text = "Please wait...";
            }
            

                if (progressBar1.Value == 100)
                {
                    timer1.Dispose();
                    this.Visible = false;
                    Login obLogin = new Login();
                    obLogin.Show();
                }
            
        }

        private void Welcome_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }
    }
}

